package com.film.admincontroller;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.film.service.FilmService;
import com.film.service.impl.FilmServiceImpl;

/**
 * 用来做即将上映电影的上架
 * @author 2119196781
 *
 */
@WebServlet("/showUpOffTheShelfFilm.do")
public class PutOnTheShelvesShowFilmController extends HttpServlet{
	private FilmService filmService = new FilmServiceImpl();
	@Override
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		String filmId = request.getParameter("filmId");
		filmService.updateFilm(Integer.parseInt(filmId),0);
		
		response.sendRedirect("/film/showOffTheShelfFilm.do?flag=1");
	}
}
